﻿<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="format-detection" content="telephone=no">
	<title>拍品分类</title>
	<link href="<?php echo TEMPLATE_SITE_URL;?>/css/common.css" rel="stylesheet" type="text/css">
    <style type="text/css">
        * {
            outline: none;
            -webkit-tap-highlight-color: rgba(255, 0, 0, 0);
            vertical-align: baseline;
            font-style: normal;
        }

        body {
            margin: 0;
            padding: 0;
            font-size: 12px;
            font-family: Microsoft Yahei, Arial, Simsun, Helvetica, Segoe UI, sans-serif;
            color: #404040;
        }

        img {
            border: 0
        }

        ul, ol, li, dt, dl, dd {
            text-decoration: none;
            list-style: none;
            vertical-align: middle;
            margin: 0;
            padding: 0;
        }

        a,
        a:visited {
            color: #373737;
            text-decoration: none;
        }

        .blank {
            width: 100%;
            height: 20px;
        }
		#getCode {color:#777;margin-right:20px;text-align:right;margin-top:8px;background:#fff;float:right;cursor:pointer;}
		 .blank {
            width: 100%;
            height: 20px;
        }

        .clear, .space {overflow: hidden; height: 0px; line-height: 0px; background: none; border: none; padding: 0; margin: 0;}
        .clear {clear: both;}
        .userinfoMain {
            width: 100%;
            background-color: #FFF;
            display: table;
        }
		.filterTop {width:100%;height:40px;position:fixed;top:0px;border-bottom:#dadada 1px solid;background:#fff;}
		.filterTopLeft {width:85%;height:40px;float:left;}
		.filterTopRight {width:14%;height:40px;border-left:#dadada 1px solid;text-align:center;float:left;}
        .filterTopLeft ul li {width:33.3%;height:40px;line-height:40px;text-align:center;float:left;}
		.filterTopLeft ul li a {display:block;font-size:1.2em;}
		.filterTopLeft ul li .on {color:#d73037;}
		.filterBottom ul li {height:100px;padding:10px;}
		.filterItemLeft {width:30%;height:100px;float:left;}
		.filterItemRight {width:65%;height:100px;margin-left:4%;border-bottom:#ddd 1px solid;float:left;}
		.filterItemLeft img {width:100%;height:100%;}
		.filterItemTitle {font-size:1.2em;line-height:20px;}
		.price {color:#ab0008;font-size:1.2em;font-family:Arial;}
		.price em {color:#777;font-size:0.8em;}
        .fire {color:#838383;padding-right:15px;background:url(<?php echo TEMPLATE_SITE_URL;?>/images/flameIcon.jpg) right center no-repeat;background-size:40%;float:right}
		.like {color:#838383;padding-right:15px;margin-left:5px;background:url(<?php echo TEMPLATE_SITE_URL;?>/images/liked1.png) right center no-repeat;background-size:55%;float:right;}		
        .supportBanner {width: 100%;text-align: center;height: 49px;line-height: 49px;font-size: 12px;border-top: 1px solid #eaeae8;background-color: #F8F8F8;margin-top: 10px; color: #888; visibility: hidden;}
        .supportBanner a { color: #F2B896}
    	.time {color:#868686;margin-top:8px;}

		.filterItemPhr {height:30px;line-height:30px;}
    </style>
    <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/zepto.js" charset="utf-8"></script>
</head>

<body>
    <div id="contentbox" >
        <div class="userinfoMain">
          <div class="filter">
            <div class="filterTop">
              <div class="filterTopLeft">
              	  <ul>
              	  	<li><a href="index.php?act=category&op=categorylist&cate_0=<?php echo $_GET['cate_0']?>&cate_1=<?php echo $_GET['cate_1']?>" <?php if(empty($_GET['fieldsort'])){?>class="on"<?php }?>>默认排序</a></li>
              	  	<li><a href="index.php?act=category&op=categorylist&cate_0=<?php echo $_GET['cate_0']?>&cate_1=<?php echo $_GET['cate_1']?>&fieldsort=auction_id" <?php if($_GET['fieldsort']=='auction_id'){?>class="on"<?php }?>>最新上拍</a></li>
              	  	<li><a href="index.php?act=category&op=categorylist&cate_0=<?php echo $_GET['cate_0']?>&cate_1=<?php echo $_GET['cate_1']?>&fieldsort=end_time" <?php if($_GET['fieldsort']=='end_time'){?>class="on"<?php }?>>即将截拍</a></li>
              	  </ul>
              </div>
              <div class="filterTopRight settemplate"><img src="<?php echo TEMPLATE_SITE_URL;?>/images/listIcon02.jpg" width="40" height="40"></div>
             </div>
             <div class="filterBottom" style="padding-top: 45px;">
                <ul id="categoryauction"></ul>
            </div>
           </div>
        </div>
</div>
<input type="hidden" name="haspage" value="1" id="haspage">
<input type="hidden" name="pagenum" value="0" id="pagenum">
<div class="loadNextPage" style="margin-top:10px;color:#777;text-align:center;font-size:13px;display:none;">
	<div class="loading" style="width:100px;height:40px;margin-left:auto;margin-right:auto">
		<img src="<?php echo TEMPLATE_SITE_URL;?>/images/loadingData.gif" style="float:left">
		<span style="float:left;margin-top:10px;">加载拍卖</span>
	</div>
</div>    
    
<script type="text/javascript">
$(function(){

	$('.settemplate').click(function(){
		var template_id = 1;
		$.ajax({
			type:'get',
			url:'index.php?act=category&op=settemplate',
			data:{template_id:template_id},
			dataType:'json',
			success:function(data){
				if(data.state==1){
					location.reload();
				}
			}
		});
	});
	
	$(window).scroll(function (){
	    var $body = $("body");
	    if (($(window).height() + $(window).scrollTop()) >= $body.height()) {
	        var haspage = parseInt($('#haspage').val());
	        if(haspage=='0'){
				return false;
			}
			var pagenum = parseInt($('#pagenum').val());
			var nextpage = eval(pagenum+1);
					
			ajaxdata(nextpage);
	    }
	});

	function ajaxdata(nextpage){
		var cate_0 = '<?php if(isset($_GET['cate_0'])){ echo intval($_GET['cate_0']);}?>';
		var cate_1 = '<?php if(isset($_GET['cate_1'])){ echo intval($_GET['cate_1']);}?>';		var sort='<?php echo $output['sort'];?>';
		$.ajax({
			type:'get',
			url:'index.php?act=category&op=categorydata&fieldsort='+sort,
			data:{nextpage:nextpage,cate_0:cate_0,cate_1:cate_1},
			dataType:'html',
			success:function(html){
				$('.loadNextPage').hide();
				if(html==''){
					$('#haspage').val('0');
				}else{
					$('#pagenum').val(nextpage);
					$('#categoryauction').append(html);
				}
			}
		});
	}

	ajaxdata(1);
});

</script>   
<script type='text/javascript'>
	$(function(){	
		var time = parseInt("<?php echo TIMESTAMP;?>");
		$('.process').each(function(){
			var lag = parseInt($(this).attr('endtime')) - time;
			if(lag>0){
			   var second = Math.floor(lag % 60);    
			   var minite = Math.floor((lag / 60) % 60);
			   var hour = Math.floor((lag / 3600) % 24);
			   var day = Math.floor((lag / 3600) / 24);
			   $(this).html('<span style="color:#910012;font-size:16px;">&nbsp;'+day+'&nbsp;</span>'+'<?php echo $lang['bearshop_day'];?>'+'<span style="color:#910012;font-size:16px;">&nbsp;'+hour+'&nbsp;</span>'+'<?php echo $lang['bearshop_hour'];?>'+'<span style="color:#910012;font-size:16px;">&nbsp;'+minite+"&nbsp;</span>"+'<?php echo $lang['bearshop_minute'];?>'+'<span style="color:#910012;font-size:16px;">'+second+'</span>');
			}
		});
		function updateEndTime(){
			time++;		
			$(".process").each(function(){
				var lag = parseInt($(this).attr('endTime')) - time;
				if(lag>0){
				    var second = Math.floor(lag % 60);    
				    var minite = Math.floor((lag / 60) % 60);
				    var hour = Math.floor((lag / 3600) % 24);
				    var day = Math.floor((lag / 3600) / 24);
					$(this).html('<span style="color:#910012;font-size:16px;">&nbsp;'+day+'&nbsp;</span>'+'<?php echo $lang['bearshop_day'];?>'+'<span style="color:#910012;font-size:16px;">&nbsp;'+hour+'&nbsp;</span>'+'<?php echo $lang['bearshop_hour'];?>'+'<span style="color:#910012;font-size:16px;">&nbsp;'+minite+"&nbsp;</span>"+'<?php echo $lang['bearshop_minute'];?>'+'<span style="color:#910012;font-size:16px;">&nbsp;'+second+'&nbsp;</span>');
				}
			});
			setTimeout(updateEndTime,1000);
		}
		setTimeout(updateEndTime,1000);
	});
</script>
<?php include template('home/nav');?>      
</body>
</html>